import { BASE_URI } from "@/utils/const";
import request from '@/utils/request.js'
const GOODS_CATE_BASE_URL = '/goodscate';
export default {
    getGoodCateList(goodCateDto){
        return request({
            url: BASE_URI + GOODS_CATE_BASE_URL + '/list',
            data:{
                "page_no":goodCateDto.pageNo,
                "page_size":goodCateDto.pageSize,
                "goods_cate_name":goodCateDto.goodsCateName
            },
            method: 'post'
        })
    },
    showAllGoodCateName(){
        return request({
            url: BASE_URI + GOODS_CATE_BASE_URL + '/list',
            data:{},
            method: 'post'
        })
    },
    saveGoodCate(goodCateDto){
        return request({
            url: BASE_URI + GOODS_CATE_BASE_URL + '/save',
            data:{"goods_cate_name": goodCateDto.goodsCateName},
            method: 'post'
        })
    },
    updateGoodCate(goodCateDto){
        return request({
            url: BASE_URI + GOODS_CATE_BASE_URL + '/update',
            data:{
                "id":goodCateDto.id,
                "goods_cate_name": goodCateDto.goodsCateName
            },
            method: 'post'
        })
    },
    removeGoodCate(id){
        return request({
            url: BASE_URI + GOODS_CATE_BASE_URL + '/remove',
            params:{"id":id},
            method: 'post'
        })
    }
}